class Service(object):

    def _preprocess(self):
        return True
    def _post_process(self):
        return True

    def _run(self):
        raise NotImplementedError()

    def run(self):
        if not self._preprocess():
            return False

        if not self._run():
            return False

        if not self._post_process():
            return False

        return True
